<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
$aviso = $_GET['add'];

@session_start();
$usuarioAtivo = $_SESSION['nome'];
$isAdmin = $_SESSION['admin'];
?>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>Bloguito - Cadastro</title>
        <meta name="keywords" content="" />
        <meta name="Premium Series" content="" />
        <!-- <link href="default.css" rel="stylesheet" type="text/css" media="screen" /> -->
        <?php require('css.inc');
        ?>
    </head>
    <body>
        <!-- start header -->
        <div id="header">
            <div id="logo">
                <h1><a href="#"><span>Bloguito Acessivel  </span></a></h1>
                <p>Experiencia em PNE</p>
                <?php
                if ($usuarioAtivo) {
                    echo '
                <div id="logado">
                    Seja Bem-Vind' . $sufixoSexo . '
                        <br><span id="usuario">' . $usuarioAtivo . '</span>
                        &nbsp;&nbsp;&nbsp;<sub><a href="logout.php">Sair</a></sub>

                </div>';
                }
                ?>
            </div>

            <div id="menu">
                <ul id="main">
                    <li><a href="index.php?id=1" class="first">Home</a></li>
                    <li><a href="index.php?id=2">Postagens</a></li>
                    <li><a href="index.php?id=3">Login</a></li>
                    <li><a href="index.php?id=4">Creditos</a></li>
                    <?php
                    if ($isAdmin)
                        echo'<li class="current_page_item"><a href="cadastro.php">Cadastro</a></li>';
                    ?>
                </ul>

            </div>
        </div>
        <!-- end header -->
        <div id="wrapper">
            <!-- start page -->
            <div id="cadastro">
                <?php
                    if ($aviso)
                        echo "<center>*** Usuario cadastrado. ***</center>";
                ?>
                    <table id="tb_cad" align="center" cellspacing="10">
                        <tr><td colspan="4"> <center> <h1>Cadastro de Novo Usuario</h1> </center></td> </tr>
                        <form action="addUser.php" method="post">
                            <tr>
                                <td> Usuario:</td>
                                <td><input type="text" name="usuario" /></td>

                                <td> Nome:</td>
                                <td><input type="text" name="nome" /></td>
                            </tr>
                            <tr>
                                <td> Senha:</td>
                                <td><input type="password" name="senha" /> </td>

                                <td> Sobre Nome:</td>
                                <td><input type="text" name="sobre_nome" /></td>
                            </tr>
                            <tr>
                                <td>Confirme a Senha:</td>
                                <td><input type="password" name="confsenha" /> </td>

                                <td> Sexo:</td>
                                <td><select name="sexo">
                                        <option value="feminino">Feminino</option>
                                        <option value="masculino">Masculino</option>
                                    </select> </td>
                            </tr>
                            <tr>
                                <td> email:</td>
                                <td><input type="text" name="email" /></td>

                                <td> Ativo: <input type="checkbox" name="ativo" /></td>
                                <td> Admin: <input type="checkbox" name="admin" /></td>
                            </tr>


                            <tr>
                                <td colspan="3"></td><td><br></br><input id="login-submit" type="submit" name="logar" value="Cadastrar" /> </td>
                            </tr>
                        </form>
                    </table>
                </div>
            </div>
            <!-- end page -->

        <?php
                    require_once 'fim.inc';
        ?>

